import type {Route}          from '../index.type'
import Layout                from '@/layout/index.vue'
import {createNameComponent} from '../createNode'

const route: Route[] = [
    {
        path     : '/systemManagement',
        component: Layout,
        redirect : '/systemManagement/user',
        meta     : {title: '系统管理', icon: 'sfont system-home'},
        children : [
            {
                path     : 'user',
                component: createNameComponent(() => import('@/views/main/systemManagement/user/index.vue')),
                meta     : {title: '成员管理', icon: 'sfont system-home', roles: ['admin']}
            },
            {
                path     : 'project',
                component: createNameComponent(() => import('@/views/main/systemManagement/project/index.vue')),
                meta     : {title: '项目管理', icon: 'sfont system-home', roles: ['admin']}
            },
            {
                path     : 'group',
                component: createNameComponent(() => import('@/views/main/systemManagement/group/index.vue')),
                meta     : {title: '分组管理', icon: 'sfont system-home', roles: ['admin']}
            },
            {
                path     : 'auditLog',
                component: createNameComponent(() => import('@/views/main/systemManagement/auditLog/index.vue')),
                meta     : {title: '审计日志', icon: 'sfont system-home', roles: ['admin']}
            }
        ]
    }
]

export default route
